package com.niit.service.impl;

import dao.UserDao;
import model.User;
import service.IUserService;

import java.sql.SQLException;

public class UserServiceImpl implements IUserService {
    private UserDao userDao = new UserDao();
    @Override
    public void saveUser(User user) throws SQLException {
        userDao.saveUser(user);
    }

    @Override
    public User login(String username, String password) {
        return  userDao.login(username,password);
    }
    @Override
    public boolean userIsExist(String username) {
        return userDao.userIsExist(username);
    }
    @Override
    public String getEmail(String username) {return userDao.getEmail(username);}
}
